package com.eight.order.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eight.order.pojo.OrderPayLog;
import com.eight.order.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @program: qy8-education
 * @description:
 * @author: 郑友民（1460115388@qq.com）
 * @create: 2023-05-26 16:13
 **/

public interface OrderDao extends BaseMapper<Order> {
    @Select("SELECT o.*,tpl.pay_time,tpl.transaction_id FROM t_order o JOIN t_pay_log tpl ON o.order_no =tpl.order_no where o.id=#{id}")
    OrderPayLog queryOrderAndPayLog(String id);

    IPage<Order> findPage(IPage<Order> page,@Param("ew") QueryWrapper<Order> wrapper);
}

